import java.util.Scanner;

/**
 * @author tongchen
 * @create 2023-01-06 21:50
 */
public class EgyptNumber {
    public static void main(String[] args) {
        //输入
        Scanner scan=new Scanner(System.in);
        System.out.println("请输入a");
        int a=scan.nextInt();
        System.out.println("请输入b");
        int b=scan.nextInt();
        if(a>b){
            System.out.println("输入错误");
        }
        else{
            while(a>1){
                int c=b/a+1;
                a=a*c-b;
                b=b*c;
                System.out.printf("1/%d",c);
                if(a>=1){
                    System.out.print("+");
                }
                if(a==1||b%a==0){
                    System.out.printf("%d/%d",a,b);
                    break;
                }
            }

        }
    }

}
